#!/usr/bin/python3
# @Time    : 2018/6/3 上午 7:39:38  
# @Author  : LaoJI

# !/usr/bin/python3
# @Time    : 2018/6/3 上午 7:35:12
# @Author  : LaoJI
import datetime

from sqlalchemy import Column, ForeignKey, func
from sqlalchemy import String, Unicode, DateTime, Boolean
from sqlalchemy import SmallInteger, Integer, TIMESTAMP
from sqlalchemy.orm import relationship
from app.models.base import db, Base


class Teacher(Base):
    __tablename__ = 'users'

    id = Column(Integer, primary_key=True)
    created_at = Column("created_at", TIMESTAMP, default=datetime.datetime.now(), nullable=False)
    updated_at = Column("updated_at", TIMESTAMP, default=datetime.datetime.now(), nullable=False)
    email = Column("email", String(255), default=None, nullable=False)
    telephone = Column("telephone", String(255), default=None, nullable=False)
    verify_state = Column("verify_state", String(255), default='0', nullable=False)
    secret_key = Column("secret_key", String(255), default=None, nullable=False)
    is_admin = Column("is_admin", SmallInteger, default=None, nullable=False)
    avatar_url = Column("avatar_url", String(255), default=None, nullable=False)
    nick_name = Column("nick_name", String(255), default=None, nullable=False)
    password = Column("password", String(255), default=None, nullable=False)

